home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 031a / unload.zip / UNLOAD.TXT < prev   
Text File  |  1991-11-12  |  4KB  |  90 lines

  1. Unload v1.0a
  2. Copyright ⌐ 1991, by Mike Sax
  3. Compuserve: 75470,1403
  4. Tel: +3237663264
  5. Fax: +3237781405
  6.  
  7. Contents
  8. --------
  9.  
  10. - About Unload
  11. - When you might need Unload
  12. - The "PLEASE INSERT THE DISK WITH TOOLHELP.DLL INTO DRIVE A:" message
  13. - The list of libraries and tasks
  14. - Methods to unload
  15. - Obtaining source code
  16.  
  17. About Unload
  18. ------------
  19.  
  20. Unload is a small programmer's utility that lets you remove any Windows
  21. program or dynamic link library from memory.  It can be useful when you
  22. are developing a Windows program or DLL that has a problem with getting
  23. unloaded. Instead of having to exit Windows to remove the module from
  24. memory, you can just use unload and recompile.
  25.  
  26. When you might need Unload
  27. --------------------------
  28.  
  29. Basically, Unload is only useful when you have a library or program that 
  30. you can't remove with the "standard" user's methodes, like selecting "End
  31.  Task" option in the task list, or closing the app's Window.  This  could 
  32. occur if a library's usage count is higher than zero, but the app that 
  33. is using it was terminated, or you have an Application that doesn't 
  34. have any visible Windows.
  35.  
  36. The "PLEASE INSERT THE DISK WITH TOOLHELP.DLL INTO DRIVE A:" message
  37. --------------------------------------------------------------------
  38.  
  39. To get a list of all libraries and modules, Unload uses the Microsoft
  40. ToolHelp DLL, which is also distributed in the Dr. Watson diagnostics
  41. program.  If you don't have toohelp.dll on your system, you can obtain
  42. Dr. Watson from Microsoft, or download it from Compuserve and most other
  43. bulletin board systems.
  44.  
  45. The ToolHelp.Dll file should be either in the same directory as 
  46. unload.exe, or it should be in a directory that is in your current path. 
  47. If it isn't, you'll get the error message described above.
  48.  
  49. The list of libraries and tasks
  50. -------------------------------
  51.  
  52. Unload displays a list of all libraries and tasks that are loaded or 
  53. running on your system.  Since fonts and drivers are also DLL's they're 
  54. also in the list.  If you have several instances of a module running, 
  55. Unload will display the module once for every task, so you can unload 
  56. them individually.  Tasks are displayed in uppercase, DLL's are in 
  57. lowercase.
  58.  
  59. When you select a library or task, Unload will display a little 
  60. information about it, like the usage count, wether it's a library or 
  61. a task, the program's filename and the module handle.
  62.  
  63. Methods to unload
  64. -----------------
  65.  
  66. There's only one method to unload a DLL: decrease the module's usage 
  67. count. If you want to unload a task, you can use any of three methods.  
  68. You can:
  69.  1) Post a WM_QUIT message to the application, which is like calling the
  70.     PostQuitMessage function inside the applicaton ;
  71.  2) Post a WM_CLOSE message to all the applications's main windows, even
  72.     if they are invisible ; or
  73.  3) Terminate the application.    Terminating the application is the most
  74.     drastic and is as if an unrecoverable application error would occur.
  75.  
  76. Posting WM_CLOSE is the "softest" method to unload an application, and 
  77. it's also used by the task manager (although the task manager won't find 
  78. any invisible windows).  Posting WM_QUIT is also quite "soft", because 
  79. it gives the application the oppertunity to do any clean up after its 
  80. main message loop.  Terminating the application is the most drastic 
  81. measure and it will immediately terminate the application.  You  should 
  82. only use this when absolutely necessary.
  83.  
  84. Obtaining Source Code
  85. ---------------------
  86. Because as of this writing Microsoft has not published any  documentation 
  87. about the ToolHelp API, Unload's source code cannot be  included.  If 
  88. you'd like to have it, send me a message on Compuserve  (75470,1403) and 
  89. I'll send it to you as sooon as the ToolHelp API is made public.
  90.